package android.demo.service.aidl.domain;

import android.os.Parcel;
import android.os.Parcelable;

public class Contact implements Parcelable {

	private String contactId;     
	private String groupId;       
	private String name;   
	private int age;
	private String mobilePhone;
	private String email;
	private String address; 
	
	
	public static final Parcelable.Creator<Contact> CREATOR = new Creator<Contact>() {
		public Contact createFromParcel(Parcel source) {
			
			Contact contact = new Contact();
			
			contact.contactId = source.readString();
			contact.groupId = source.readString();
			contact.name = source.readString();
			contact.age = source.readInt();
			contact.mobilePhone = source.readString();
			contact.email = source.readString();
			contact.address = source.readString();

			return contact;
		}
	
		public Contact[] newArray(int size) {
			return new Contact[size];
		}
	};


	public int describeContents() {
		return 0;
	}


	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(contactId);
		dest.writeString(groupId);
		dest.writeString(name);
		dest.writeInt(age);
		dest.writeString(mobilePhone);
		dest.writeString(email);
		dest.writeString(address);
	}
	
	public String getContactId() {
		return contactId;
	}

	public void setContactId(String contactId) {
		this.contactId = contactId;
	}

	
	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getMobilePhone() {
		return mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public static Parcelable.Creator<Contact> getCreator() {
		return CREATOR;
	}
	
}